\(\int \frac {1}{x (a+b x)} \, dx\) [163]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 18 \[ \int \frac {1}{x (a+b x)} \, dx=\frac {\log (x)}{a}-\frac {\log (a+b x)}{a} \]

[Out]

ln(x)/a-ln(b*x+a)/a

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {36, 29, 31} \[ \int \frac {1}{x (a+b x)} \, dx=\frac {\log (x)}{a}-\frac {\log (a+b x)}{a} \]

[In]

Int[1/(x*(a + b*x)),x]

[Out]

Log[x]/a - Log[a + b*x]/a

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {1}{x} \, dx}{a}-\frac {b \int \frac {1}{a+b x} \, dx}{a} \\ & = \frac {\log (x)}{a}-\frac {\log (a+b x)}{a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int \frac {1}{x (a+b x)} \, dx=\frac {\log (x)}{a}-\frac {\log (a+b x)}{a} \]

[In]

Integrate[1/(x*(a + b*x)),x]

[Out]

Log[x]/a - Log[a + b*x]/a

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89

method result size
parallelrisch \(\frac {\ln \left (x \right )-\ln \left (b x +a \right )}{a}\) \(16\)
default \(\frac {\ln \left (x \right )}{a}-\frac {\ln \left (b x +a \right )}{a}\) \(19\)
norman \(\frac {\ln \left (x \right )}{a}-\frac {\ln \left (b x +a \right )}{a}\) \(19\)
risch \(\frac {\ln \left (-x \right )}{a}-\frac {\ln \left (b x +a \right )}{a}\) \(21\)

[In]

int(1/x/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

(ln(x)-ln(b*x+a))/a

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int \frac {1}{x (a+b x)} \, dx=-\frac {\log \left (b x + a\right ) - \log \left (x\right )}{a} \]

[In]

integrate(1/x/(b*x+a),x, algorithm="fricas")

[Out]

-(log(b*x + a) - log(x))/a

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.56 \[ \int \frac {1}{x (a+b x)} \, dx=\frac {\log {\left (x \right )} - \log {\left (\frac {a}{b} + x \right )}}{a} \]

[In]

integrate(1/x/(b*x+a),x)

[Out]

(log(x) - log(a/b + x))/a

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int \frac {1}{x (a+b x)} \, dx=-\frac {\log \left (b x + a\right )}{a} + \frac {\log \left (x\right )}{a} \]

[In]

integrate(1/x/(b*x+a),x, algorithm="maxima")

[Out]

-log(b*x + a)/a + log(x)/a

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.11 \[ \int \frac {1}{x (a+b x)} \, dx=-\frac {\log \left ({\left | b x + a \right |}\right )}{a} + \frac {\log \left ({\left | x \right |}\right )}{a} \]

[In]

integrate(1/x/(b*x+a),x, algorithm="giac")

[Out]

-log(abs(b*x + a))/a + log(abs(x))/a

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {1}{x (a+b x)} \, dx=-\frac {2\,\mathrm {atanh}\left (\frac {2\,b\,x}{a}+1\right )}{a} \]

[In]

int(1/(x*(a + b*x)),x)

[Out]

-(2*atanh((2*b*x)/a + 1))/a